package com.navi.loaddata.core.oracleEntity.cell2;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by ghost on 2018/7/13.
 */
@Entity
@Table(name = "ETL_CELL2_RESULT_V", schema = "EDALDR", catalog = "")
@IdClass(EtlCell2ResultVPK.class)
public class EtlCell2ResultV {
    private String stepId;
    private String chipId;
    private Date chipEndTime;
    private String paramCollection;
    private String paramName;
    private String siteName;
    private Double paramValue;
    private Double x;
    private Double y;
    private Double specHigh;
    private Double specLow;
    private Double specTarget;
    private Double controlHigh;
    private Double controlLow;

    @Id
    @Column(name = "STEP_ID")
    public String getStepId() {
        return stepId;
    }

    public void setStepId(String stepId) {
        this.stepId = stepId;
    }

    @Id
    @Column(name = "CHIP_ID")
    public String getChipId() {
        return chipId;
    }

    public void setChipId(String chipId) {
        this.chipId = chipId;
    }

    @Id
    @Column(name = "CHIP_END_TIME")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getChipEndTime() {
        return chipEndTime;
    }

    public void setChipEndTime(Date chipEndTime) {
        this.chipEndTime = chipEndTime;
    }

    @Id
    @Column(name = "PARAM_COLLECTION")
    public String getParamCollection() {
        return paramCollection;
    }

    public void setParamCollection(String paramCollection) {
        this.paramCollection = paramCollection;
    }

    @Id
    @Column(name = "PARAM_NAME")
    public String getParamName() {
        return paramName;
    }

    public void setParamName(String paramName) {
        this.paramName = paramName;
    }

    @Id
    @Column(name = "SITE_NAME")
    public String getSiteName() {
        return siteName;
    }

    public void setSiteName(String siteName) {
        this.siteName = siteName;
    }

    @Basic
    @Column(name = "PARAM_VALUE")
    public Double getParamValue() {
        return paramValue;
    }

    public void setParamValue(Double paramValue) {
        this.paramValue = paramValue;
    }

    @Basic
    @Column(name = "X")
    public Double getX() {
        return x;
    }

    public void setX(Double x) {
        this.x = x;
    }

    @Basic
    @Column(name = "Y")
    public Double getY() {
        return y;
    }

    public void setY(Double y) {
        this.y = y;
    }

    @Basic
    @Column(name = "SPEC_HIGH")
    public Double getSpecHigh() {
        return specHigh;
    }

    public void setSpecHigh(Double specHigh) {
        this.specHigh = specHigh;
    }

    @Basic
    @Column(name = "SPEC_LOW")
    public Double getSpecLow() {
        return specLow;
    }

    public void setSpecLow(Double specLow) {
        this.specLow = specLow;
    }

    @Basic
    @Column(name = "SPEC_TARGET")
    public Double getSpecTarget() {
        return specTarget;
    }

    public void setSpecTarget(Double specTarget) {
        this.specTarget = specTarget;
    }

    @Basic
    @Column(name = "CONTROL_HIGH")
    public Double getControlHigh() {
        return controlHigh;
    }

    public void setControlHigh(Double controlHigh) {
        this.controlHigh = controlHigh;
    }

    @Basic
    @Column(name = "CONTROL_LOW")
    public Double getControlLow() {
        return controlLow;
    }

    public void setControlLow(Double controlLow) {
        this.controlLow = controlLow;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        EtlCell2ResultV that = (EtlCell2ResultV) o;

        if (stepId != null ? !stepId.equals(that.stepId) : that.stepId != null) return false;
        if (chipId != null ? !chipId.equals(that.chipId) : that.chipId != null) return false;
        if (chipEndTime != null ? !chipEndTime.equals(that.chipEndTime) : that.chipEndTime != null) return false;
        if (paramCollection != null ? !paramCollection.equals(that.paramCollection) : that.paramCollection != null)
            return false;
        if (paramName != null ? !paramName.equals(that.paramName) : that.paramName != null) return false;
        if (siteName != null ? !siteName.equals(that.siteName) : that.siteName != null) return false;
        if (paramValue != null ? !paramValue.equals(that.paramValue) : that.paramValue != null) return false;
        if (x != null ? !x.equals(that.x) : that.x != null) return false;
        if (y != null ? !y.equals(that.y) : that.y != null) return false;
        if (specHigh != null ? !specHigh.equals(that.specHigh) : that.specHigh != null) return false;
        if (specLow != null ? !specLow.equals(that.specLow) : that.specLow != null) return false;
        if (specTarget != null ? !specTarget.equals(that.specTarget) : that.specTarget != null) return false;
        if (controlHigh != null ? !controlHigh.equals(that.controlHigh) : that.controlHigh != null) return false;
        if (controlLow != null ? !controlLow.equals(that.controlLow) : that.controlLow != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = stepId != null ? stepId.hashCode() : 0;
        result = 31 * result + (chipId != null ? chipId.hashCode() : 0);
        result = 31 * result + (chipEndTime != null ? chipEndTime.hashCode() : 0);
        result = 31 * result + (paramCollection != null ? paramCollection.hashCode() : 0);
        result = 31 * result + (paramName != null ? paramName.hashCode() : 0);
        result = 31 * result + (siteName != null ? siteName.hashCode() : 0);
        result = 31 * result + (paramValue != null ? paramValue.hashCode() : 0);
        result = 31 * result + (x != null ? x.hashCode() : 0);
        result = 31 * result + (y != null ? y.hashCode() : 0);
        result = 31 * result + (specHigh != null ? specHigh.hashCode() : 0);
        result = 31 * result + (specLow != null ? specLow.hashCode() : 0);
        result = 31 * result + (specTarget != null ? specTarget.hashCode() : 0);
        result = 31 * result + (controlHigh != null ? controlHigh.hashCode() : 0);
        result = 31 * result + (controlLow != null ? controlLow.hashCode() : 0);
        return result;
    }
}
